package com.estate.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.estate.pojo.Detail;
import com.estate.pojo.Project;
import com.estate.pojo.Region;


public interface DetailMapper {
	
	//根据项目id查找区域表中的区域编号 
	public List<Detail> findCodeByProId(@Param(value = "ProId")Integer ProId) throws Exception;
	
	//按主项目id查询主项目id，项目名称和分期项目的信息
	public List<Detail> getMessByPorId(@Param(value = "ProId")Integer ProId) throws Exception;

    int deleteByPrimaryKey(Integer detId);

    int insert(Detail record);

    int insertSelective(Detail record);

    Detail selectByPrimaryKey(Integer detId);

    int updateByPrimaryKeySelective(Detail record);

    int updateByPrimaryKey(Detail record);
    
    /**
     * 查看某个项目详细信息
     * @param project_id:项目id
     * @param det_abbreviation:项目简称
     * @return
     */
    Detail selectDetail(@Param(value = "project_id") Integer project_id
    						 ,@Param(value = "det_id") Integer det_id) throws Exception;
    
    /**
     * 查看全部项目基本信息
     * @return
     */
    List<Detail> selDetail() throws Exception;
    
    /**
     * 按照项目id查看该项目下的楼栋信息
     * @return
     */
    List<Detail> selectDetByProId(@Param(value = "ProId")Integer ProId) throws Exception;
    
    /**
     * 查询分期项目的编号
     * @param ProId
     * @return
     * @throws Exception
     */
    List<Detail> findDetCodingByProId(@Param(value = "ProId")Integer ProId) throws Exception;
    
}